package com.foreknow.OOP;
/**
 *
 * */
public class Student {
   private String name;
   private String sno;
   private int score;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSno() {
        return sno;
    }

    public void setSno(String sno) {
        this.sno = sno;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }
    public Student[] sortStudent(Student[] st){
        Student[] sts = st;
        for (int i = 1; i < sts.length;i++){
            for (int j = 0;j <sts.length-1;j++){
                if (sts[j].getScore() < sts[j+1].getScore()){

                    Student stsTemp = new Student();

                    stsTemp = sts[j];

                    sts[j] = sts[j+1];

                    sts[j+1] = stsTemp;
                }
            }
        }
        return sts;
    }

}
